using System;
using UnityEngine;

//爆炸鸟
public class BoomBird : Bird {

    public float boomRadius = 2.5f;//爆炸半径

    protected override void FullTimeSkill()
    {
        Collider2D[] colliders = Physics2D.OverlapCircleAll(transform.position, boomRadius);
        foreach (Collider2D collider in colliders)
        {
            Destructiable des = collider.GetComponent<Destructiable>();
            if(des != null) des.TakeDamage(int.MaxValue);
        }

        state = BirdState.WaitToDie;
        LoadNextBird();
    }
}